checkout: Fix leak when doing uncompressed cache + copying checkouts
authorColin Walters <walters@verbum.org>
Fri, 13 Sep 2013 21:14:35 +0000 (17:14 -0400)
committerColin Walters <walters@verbum.org>
Fri, 13 Sep 2013 21:15:30 +0000 (17:15 -0400)
We were reading into "input" twice, leading a fd.  This was
breaking the gnome-continuous integrationtest.

src/libostree/ostree-repo-checkout.c

index 13add0479a656066fc725368aed2dcdfa0fa2041..f91b1c182adfbcf9b49089ddabdfd6d2b9bff5e1 100644 (file)
@@ -423,7 +423,7 @@ checkout_one_file_at (OstreeRepo                        *repo,
       && mode == OSTREE_REPO_CHECKOUT_MODE_USER
       && repo->enable_uncompressed_cache)
     {
-      if (!ostree_repo_load_file (repo, checksum, &input, NULL, &xattrs,
+      if (!ostree_repo_load_file (repo, checksum, &input, NULL, NULL,
                                   cancellable, error))
         goto out;
 
@@ -437,6 +437,8 @@ checkout_one_file_at (OstreeRepo                        *repo,
           g_prefix_error (error, "Unpacking loose object %s: ", checksum);
           goto out;
         }
+      
+      g_clear_object (&input);
 
       /* Store the 2-byte objdir prefix (e.g. e3) in a set.  The basic
        * idea here is that if we had to unpack an object, it's very